<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 <title>Inspire - Admin and Dashboard Template</title>
 <link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css">
 <link rel="stylesheet" type="text/css" href="/assets/fonts/line-icons.css">
 <link rel="stylesheet" type="text/css" href="/assets/css/main.css">
 <link rel="stylesheet" type="text/css" href="/assets/css/responsive.css">
</head>
<body>

<div class="card-header border-bottom">
 <h4 class="card-title" >添加排片</h4>
</div>
<div class="msg" th:text="${ msg }"></div>
<div class="col-12 grid-margin">
 <div class="card">

  <div class="card-body">
   <form class="form-sample" id="films">
    <div class="row">
     <div class="col-md-6">
      <div class="form-group row">
       <label class="col-sm-3 col-form-label">影厅</label>
       <div class="col-sm-9">
        <input type="text" class="form-control" name="hall" th:value="${cinemas?.hall}" disabled>
       </div>
      </div>
     </div>
    </div>
    <div class="row">
     <div class="col-md-6">
      <div class="form-group row">
       <label class="col-sm-3 col-form-label">选择电影</label>
       <div class="col-sm-9">
        <select class="form-control" name="movieId">
         <option value="">请选择</option>
         <option th:each="t,line : ${ movieList }" th:value="${ t.id }" th:text="${ t.movieName }" ></option>
        </select>
       </div>
      </div>
     </div>
    </div>
    <div class="row">
     <div class="col-md-6">
      <div class="form-group row">
       <label class="col-sm-3 col-form-label">开始时间</label>
       <div class="col-sm-9">
        <input type="datetime-local" class="form-control" name="startTime">
       </div>
      </div>
     </div>
    </div>

    <div class="row">
     <div class="col-md-6">
      <div class="form-group row">
       <label class="col-sm-3 col-form-label">结束时间</label>
       <div class="col-sm-9">
        <input type="datetime-local" class="form-control" name="stopTime">
       </div>
      </div>
     </div>
    </div>

   <div class="row">
       <div class="col-md-6">
           <div class="form-group row">
               <label class="col-sm-3 col-form-label">间隔时间</label>
               <div class="col-sm-9">
                   <select class="form-control" name="spare">
                       <option value="">请选择</option>
                       <option value="10">10分钟</option>
                       <option value="20">20分钟</option>
                       <option value="30">30分钟</option>
                   </select>
               </div>
           </div>
       </div>
   </div>
    <div class="row">
     <div class="col-md-6">
      <div class="form-group row">
       <label class="col-sm-3 col-form-label">票价</label>
       <div class="col-sm-9">
        <input type="text" class="form-control" name="price">
       </div>
      </div>
     </div>
    </div>

    <input type="button" class="btn btn-common mr-3" id="save">确定</input>
    <input type="button" class="btn btn-light">取消</input>
   </form>
  </div>
 </div>
</div>

<script th:inline="javascript">
  $(".msg").slideUp(1000*2);
  $("#save").bind("click",function () {
   var id = [[${cinemas?.id}]];
   toJump("/films/automatic",$("#films").serialize()+"&cinemaId="+id)
  })
</script>

<script src="/assets/js/jquery-min.js"></script>
<script src="/assets/js/popper.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/jquery.app.js"></script>
<script src="/assets/js/main.js"></script>
</body>
</html>